<template>
  <div class="hello">
    <!-- <h1>{{ msg }}</h1> -->
    <h1>离线预览文件</h1>
    <input type="file" @change="changeHandle">
    <filepreview ref="filepreview"/>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  created() {},
  data() {
    return {
      file:''
    }
  },
  methods:{
    changeHandle(event) {
      let file = event.target.files[0]
      this.file = file
      this.$refs.filepreview.fileReader(this.file)
    }
  }
}
</script>

<style scoped>

.fileBox .ant-list-empty-text {
  display: none;
}
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
